<?php
$name1 = $_POST['basic_name1']; //giĂ¡ trá»‹ cá»§a form name="basic_name1"
$name2 = $_POST['basic_name2']; //giĂ¡ trá»‹ cá»§a form name="basic_name2"

//connect datbase
$conn = mysql_connect('localhost','root' ,'vertrigo');
mysql_select_db('tdc');
$result=mysql_query("INSERT INTO students(id,name) VALUES('$name1','$name2')");
?>


<html>
    <head>
        <meta charset="UTF-8">
        <link href="style.css" rel="stylesheet" type="text/css"/>
        <meta http-equiv="refresh" content="2; url=index.php"/>
    </head>
    <body>
        <div class="wrapper">
            <div class="info">
                <?php
                if ($result == true) {
                    echo "Them Thanh cong, Ban se quay lai trang chu trong giay lat...";
                } else {
                    echo "Them That bai, Ban se quay lai trang chu trong giay lat....";
                }
                ?>
            </div>
        </div>
       
    </body>
</html>